<template>
	<div class="detail">
		<div class="info">
			<h2>主播</h2>
			<div class="title">
				<div class="content">
					<div class="imgbox">
						<img :src="radiolist.dj.avatarUrl" alt="" />
					</div>
					<div class="musinfo">
						<p>{{radiolist.dj.nickname}}</p>
						<span>网易云音乐</span>
					</div>
				</div>
				<div class="likes">
					<button>赞赏</button>
					<p>{{radiolist.programCount}}</p>
				</div>
			</div>
		</div>

		<div class="infos">
			<h2>电台内容简介</h2>
			<div class="classify">
				<h3>分类:</h3>
				<span>{{radiolist.category}}</span>
			</div>
			<p>{{radiolist.desc}}</p>

		</div>
	</div>
</template>

<script>
	export default {
		name: "show",
		data() {
			return {
				radiolist: JSON.parse(localStorage.getItem("radiolists")) ? JSON.parse(localStorage.getItem("radiolists")) : ""
			}
		},
		created() {
			console.log(this.radiolist)
			this.radiolist = JSON.parse(localStorage.getItem("radiolists"))
		}
	}
</script>

<style lang="scss" scoped>
	@import "~@/assets/css/common.scss";
	.detail {
		padding: 0 vw(16);
		.info {
			h2 {
				font-size: vw(16);
				margin-bottom: vw(16);
			}
			.title {
				display: flex;
				justify-content: space-between;
				align-items: center;
				.content {
					display: flex;
					align-items: center;
					.imgbox {
						width: vw(50);
						height: vw(50);
						border-radius: 50%;
						overflow: hidden;
						img {
							width: 100%;
						}
					}
					.musinfo {
						margin-left: vw(10);
						p {
							font-size: vw(16);
							color: #333;
						}
						span {
							font-size: vw(12);
							color: #999;
						}
					}
				}
				.likes {
					text-align: center;
					button {
						color: red;
						font-size: vw(12);
						padding: vw(4) vw(20);
						background: white;
						border: 1px solid red;
						border-radius: 60px;
					}
					p {
						color: #999;
						font-size: vw(12);
						margin-top: vw(4);
					}
				}
			}
		}
		.infos {
			h2 {
				font-size: vw(16);
				margin: vw(12) 0 vw(6);
			}
			.classify {
				color: #666;
				h3 {
					display: inline-block;
					margin-right: vw(10);
					font-size: vw(13);
				}
				span {
					color: red;
					border: 1px solid red;
					border-radius: vw(4);
					padding: vw(1) vw(2);
					font-size: vw(10);
				}
			}
			p {
				width: vw(240);
				color: #666;
				margin-top: vw(6);
				line-height: vw(22);
				font-size: vw(14);
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
			}
		}
	}
</style>